//
//  CoverView.m
//  The_news
//
//  Created by dlios on 15/7/17.
//  Copyright (c) 2015年 chenlin. All rights reserved.
//

#import "CoverView.h"

@implementation CoverView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
    }
    return self;
}



- (void)drawRect:(CGRect)rect
{
    float hei = self.frame.size.height;
    CGContextRef context = UIGraphicsGetCurrentContext();
    //设置填充颜色
    //UIColor *col = [UIColor colorWithRed:135.0 / 255.0 green:206.0 / 255.0 blue:235.0 / 255.0 alpha:1];
    UIColor * a = [UIColor colorWithRed:0 green:0 blue:0 alpha:0  ];
    CGContextSetFillColorWithColor(context, a.CGColor);
    //以100为半径,(150，150)围绕圆心画指定角度扇形
    CGContextMoveToPoint(context, 120, hei  - 20  ); //圆弧起点坐标
    CGContextAddArc(context, 120,  hei - 20, 100,  180 * PI / 180, 0 * PI / 180, 0);
    CGContextClosePath(context);
    CGContextSetRGBStrokeColor(context, 135.0 / 255.0 , 206.0 / 255.0, 235.0 / 255.0, 1);
    CGContextDrawPath(context, kCGPathFillStroke); //绘制路径
    
    
}

@end
